<template>
	<view class="mainpadding beijingse" v-if="pageShow">
		<view class="ffffff mainpadding radius">
			<view class="ershiba xiaohei nofonweight">{{dataAll.posinfo.PosName}}</view>
			<view class="flexbetween margin_top xiahuaxian" v-for="ite in dataAll.goodslist" :key="ite.PRec">
				<view class="shili">
					<image :src="ite.goodsinfo.image_text" mode=""></image>
				</view>
				<view class="" style="width: 66%;">
					<view class="titletext fonweight yhxk">{{ite.goodsinfo.FullName}}</view>
					<view class="flexbetween margin_top5">
						<view class=" strongtext xiaohei ">数量
							<text class="strongtext xiaohei fonweight">*{{Number(ite.Qty)}}</text>
						</view>
						<view class=" strongtext xiaohong ">成本补贴价
							<text class="sanshier xiaohong fonweight">￥{{Number(ite.total)}}</text>
						</view>
					</view>
				</view>
			</view>
			<!--  -->
			<view class="margin_top" style="margin-bottom: 120rpx;">
				<view class="strongtext xiaohei">所属药房：{{dataAll.posinfo.PosName}}</view>
				<view class="flexbetween margin_top">
					<view class="strongtext xiaohei">药房位置：{{dataAll.posinfo.adres}}</view>
					<view class="flexright" @click="openmap" v-if="dataAll.posinfo.latitude" style="min-width: 150rpx;">
						<view class="xiaolan strongtext margin_right1" >到这去</view>
						<image class="lsdz" src="../static/image/system/dz.png" mode=""></image>
					</view>
				</view>
				<view class="strongtext xiaohei margin_top">订单编号：2193872198371289</view>
				<view class="strongtext xiaohei margin_top">订单状态：{{dataAll.comment_status==1?"已完成":"待评价"}}</view>
				<!-- <view class="strongtext xiaohei margin_top">付款方式：储值支付</view> -->
				<view class="strongtext xiaohei margin_top">应付金额 ：合计￥
					<text class="xiaohei fonweight strongtext">{{Number(dataAll.totalmoney)}}</text>
				</view>
				<view class="strongtext xiaohei margin_top">实付金额 ：合计￥
					<text class="xiaohei fonweight strongtext">{{Number(dataAll.Cash)}}</text>
				</view>
				<view class="strongtext xiaohei margin_top">优惠金额 ：合计￥
					<text class="xiaohei fonweight strongtext">{{Number(dataAll.DiscountMoney)}}</text>
				</view>
				<view class="strongtext xiaohei margin_top">下单时间：{{dataAll.BillDate}}</view>
				<view style="width: 100rpx;height: 200rpx;"></view>
				<!-- <view class="strongtext xiaohei margin_top">付款时间：2023-10-28 20：32：22</view> -->
			</view>
		</view>
		<!-- 固定底部 -->
		<view class="gudingdb ffffff mainpadding" @click="tzljpj(listid)"  v-if="dataAll.Comment != 1">
			<view class="bigbtn">立即评价</view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				listid: "",
				pageShow:false,
				dataAll:{},
				datatype:"",
			}
		},
		onLoad(options) {
			this.listid = options.id
			this.datatype = options.datatype
			
		},
		onShow() {
			this.getDetail()
		},
		methods: {
			openmap(){
				uni.openLocation({
				     latitude: Number(this.dataAll.posinfo.latitude),//即将传到高德或腾讯地图的终点纬度  必须是数值，字符串无效
				     longitude:Number(this.dataAll.posinfo.longitude),//即将传到高德或腾讯地图的终点经度  必须是数值，字符串无效
				     name: this.dataAll.posinfo.PosName,//即将传到高德或腾讯地图的店铺名称
				     address: this.dataAll.posinfo.adres,//即将传到高德或腾讯地图的详细地址
				     scale: 18
				})
			},
			getDetail() {
				httpRequest.request('/api/goodscl/myOrderDetail', 'GET', {
					BillID:this.listid,
					datatype:this.datatype
				}).then(res => {
					this.dataAll = res.data
					this.pageShow = true
				})
			},
			// 跳转立即评价
			tzljpj(id) {
				uni.navigateTo({
					url: '/pages_mine/pingjiasd?id='+id+"&datatype="+this.datatype
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.lsdz {
		width: 39rpx;
		height: 36rpx;

	}

	.input {
		width: 50rpx;
		font-size: 24rpx;
		font-weight: 500;
		color: #333333;
		padding: 6rpx 10rpx;
		background: #F2F2F2;
		border-radius: 4rpx 4rpx 4rpx 4rpx;
	}

	.shili {
		width: 189rpx;
		height: 199rpx;
		border-radius: 8rpx 8rpx 8rpx 8rpx;

		image {
			width: 100%;
			height: 100%;
			border-radius: 8rpx 8rpx 8rpx 8rpx;
		}
	}
</style>